package com.isoft.c2team3service2.controller;

import com.isoft.c2team3service2.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/email")
public class EmailController {

    @Autowired
    private EmailService emailService;
    //发送邮件
    @PostMapping
    public void sendEmail(@RequestParam String email) {
        emailService.sendVerificationCode(email);
    }
}